find_package(ZLIB REQUIRED)
if (ZLIB_FOUND)
    include_directories(${ZLIB_INCLUDE_DIRS})
    add_executable(hfsort "hfsort.cpp" "hfutil.cpp")
    target_link_libraries(hfsort folly hphp_util ${ZLIB_LIBRARIES})
    hphp_link(hfsort)
    ADD_LIBRARY(jit_sort STATIC
                "jitsort.cpp" "hfutil.cpp")
    target_link_libraries(jit_sort hphp_util)
    hphp_link(jit_sort)
endif(ZLIB_FOUND)
